//package com.bxj.common.controller;
//
//import com.alibaba.fastjson.JSON;
//import com.ifeng.comic.api.domain.Comic;
//import com.ifeng.comic.api.domain.Category;
//import com.ifeng.comic.api.service.ICategoryDubboService;
//import com.ifeng.comic.api.service.IComicDubboService;
//import com.ifeng.comic.api.service.ITestDubboService;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.http.HttpStatus;
//import org.springframework.http.ResponseEntity;
//import org.springframework.stereotype.Controller;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RequestMethod;
//
//import javax.annotation.Resource;
//
///**
// * Created by baixiujiang on 17/10/15.
// */
//@Controller
//@RequestMapping(value = "/test")
//public class TestController {
//
////    @Autowired
////    EhMemcached ehMemcached;
//
//
//    @Autowired
//    IComicDubboService comicDubboService;
//    @Autowired
//    ICategoryDubboService categoryDubboService;
//
//    @Resource
//    ITestDubboService testDubboService;
//
//    @RequestMapping(value = {"/categories"}, method = RequestMethod.GET)
//    public ResponseEntity categories(Category category) {
//        return new ResponseEntity(categoryDubboService.getCategoryList(category), HttpStatus.OK);
//    }
//
//
//    @RequestMapping(value = {"/cache"}, method = RequestMethod.GET)
//    public ResponseEntity cache(Comic comic) {
//        return new ResponseEntity(JSON.toJSONString(comicDubboService.getComicList(comic)), HttpStatus.OK);
//    }
//
//    @RequestMapping(value = {"/delete"}, method = RequestMethod.GET)
//    public ResponseEntity delete(String name) {
//
//        return new ResponseEntity("", HttpStatus.OK);
//    }
//    @RequestMapping(value = {"/test_timeout"}, method = RequestMethod.GET)
//    public ResponseEntity testTimeout(int timeout) {
//        try {
//            testDubboService.testDubboTimeout(timeout);
//        } catch (Exception e) {
//            e.printStackTrace();
//            return new ResponseEntity(e.getMessage(), HttpStatus.OK);
//        }
//        return new ResponseEntity("OK", HttpStatus.OK);
//    }
//}
